package com.book.backend.controller.seckill;


import com.book.backend.feign.SeckillSessionService;
import com.book.backend.pojo.SeckillBook;
import org.springframework.data.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("/seckill")
public class SeckillSessionController {
    @Reference
    SeckillSessionService seckillSessionService;
    /**
     * 查询最近三天需要参加秒杀商品的信息
     *
     * @return
     */
    @GetMapping(value = "/Lates3DaySession")
    public List<SeckillBook> getLates3DaySession() {

        List<SeckillBook> seckillSessionEntities = seckillSessionService.getLates3DaySession();

        return seckillSessionEntities;
    }

}
